```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Maven vs Gradle：现代Java构建工具对比指南</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', 'Noto Serif SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.8;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .code-block {
            background: #2d3748;
            color: #f8f8f2;
            border-radius: 0.5rem;
            position: relative;
        }
        .code-lang {
            position: absolute;
            top: 0;
            right: 0;
            padding: 0.25rem 0.75rem;
            background: rgba(255,255,255,0.1);
            border-bottom-left-radius: 0.5rem;
            color: #e2e8f0;
            font-size: 0.875rem;
        }
        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .comparison-table {
            border-collapse: separate;
            border-spacing: 0;
        }
        .comparison-table th, .comparison-table td {
            padding: 1rem;
            text-align: left;
            border-bottom: 1px solid #e2e8f0;
        }
        .comparison-table th {
            background-color: #f7fafc;
            font-weight: 600;
        }
        .comparison-table tr:hover td {
            background-color: #f8fafc;
        }
        .tooltip {
            position: relative;
        }
        .tooltip .tooltip-text {
            visibility: hidden;
            width: 200px;
            background-color: #4a5568;
            color: #fff;
            text-align: center;
            border-radius: 6px;
            padding: 5px;
            position: absolute;
            z-index: 1;
            bottom: 125%;
            left: 50%;
            margin-left: -100px;
            opacity: 0;
            transition: opacity 0.3s;
        }
        .tooltip:hover .tooltip-text {
            visibility: visible;
            opacity: 1;
        }
        .mermaid {
            background-color: #f8fafc;
            padding: 1.5rem;
            border-radius: 0.5rem;
            margin: 2rem 0;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 px-4 md:px-0">
        <div class="container mx-auto max-w-5xl px-4">
            <div class="flex flex-col md:flex-row items-center">
                <div class="md:w-1/2 mb-10 md:mb-0">
                    <h1 class="text-4xl md:text-5xl font-bold leading-tight mb-6">Maven vs Gradle</h1>
                    <h2 class="text-xl md:text-2xl font-medium mb-6 opacity-90">现代Java构建工具深度对比</h2>
                    <p class="text-lg opacity-80 mb-8">探索两大构建工具的核心差异，为您的项目选择最适合的方案</p>
                    <div class="flex space-x-4">
                        <a href="#comparison" class="bg-white text-indigo-700 hover:bg-gray-100 px-6 py-3 rounded-md font-medium transition duration-300">
                            <i class="fas fa-balance-scale mr-2"></i>直接对比
                        </a>
                        <a href="#recommendation" class="bg-transparent border-2 border-white hover:bg-white hover:bg-opacity-10 px-6 py-3 rounded-md font-medium transition duration-300">
                            <i class="fas fa-lightbulb mr-2"></i>选择建议
                        </a>
                    </div>
                </div>
                <div class="md:w-1/2 flex justify-center">
                    <div class="relative w-full max-w-md">
                        <div class="absolute -top-6 -left-6 w-32 h-32 bg-purple-300 rounded-full opacity-20"></div>
                        <div class="absolute -bottom-6 -right-6 w-32 h-32 bg-blue-300 rounded-full opacity-20"></div>
                        <div class="relative bg-white bg-opacity-10 backdrop-filter backdrop-blur-lg rounded-xl p-6 shadow-xl">
                            <div class="flex justify-between items-center mb-4">
                                <div class="text-sm font-mono font-medium text-white text-opacity-70">构建工具对比</div>
                                <div class="flex space-x-2">
                                    <span class="w-3 h-3 rounded-full bg-red-400"></span>
                                    <span class="w-3 h-3 rounded-full bg-yellow-400"></span>
                                    <span class="w-3 h-3 rounded-full bg-green-400"></span>
                                </div>
                            </div>
                            <div class="space-y-4">
                                <div class="flex items-center">
                                    <div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center mr-3">
                                        <i class="fas fa-cog text-indigo-600"></i>
                                    </div>
                                    <div>
                                        <div class="text-sm font-medium">构建速度</div>
                                        <div class="w-full bg-gray-200 rounded-full h-1.5">
                                            <div class="bg-gradient-to-r from-blue-400 to-purple-400 h-1.5 rounded-full" style="width: 85%"></div>
                                        </div>
                                    </div>
                                </div>
                                <div class="flex items-center">
                                    <div class="w-8 h-8 rounded-full bg-purple-100 flex items-center justify-center mr-3">
                                        <i class="fas fa-plug text-purple-600"></i>
                                    </div>
                                    <div>
                                        <div class="text-sm font-medium">插件生态</div>
                                        <div class="w-full bg-gray-200 rounded-full h-1.5">
                                            <div class="bg-gradient-to-r from-blue-400 to-purple-400 h-1.5 rounded-full" style="width: 75%"></div>
                                        </div>
                                    </div>
                                </div>
                                <div class="flex items-center">
                                    <div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-3">
                                        <i class="fas fa-tachometer-alt text-blue-600"></i>
                                    </div>
                                    <div>
                                        <div class="text-sm font-medium">性能优化</div>
                                        <div class="w-full bg-gray-200 rounded-full h-1.5">
                                            <div class="bg-gradient-to-r from-blue-400 to-purple-400 h-1.5 rounded-full" style="width: 95%"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="container mx-auto max-w-5xl px-4 py-16">
        <!-- Introduction -->
        <section class="mb-20">
            <div class="text-center max-w-3xl mx-auto">
                <h2 class="text-3xl font-bold mb-6">Java生态中的构建工具之争</h2>
                <p class="text-lg text-gray-600 leading-relaxed">
                    在Java生态中，Maven和Gradle是两种最流行的构建工具。Maven以其稳定性和插件丰富度著称，而Gradle以其灵活性和高性能受到青睐。那么，在实际项目中该如何选择呢？
                </p>
            </div>
        </section>

        <!-- What are they? -->
        <section class="mb-20">
            <h2 class="text-2xl font-bold mb-8 text-center">1. Maven 和 Gradle</h2>
            
            <div class="grid md:grid-cols-2 gap-8">
                <!-- Maven -->
                <div class="bg-white rounded-xl shadow-lg overflow-hidden transition-all duration-300 feature-card">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="w-12 h-12 rounded-md bg-red-100 flex items-center justify-center mr-4">
                                <i class="fas fa-cube text-red-500 text-xl"></i>
                            </div>
                            <h3 class="text-xl font-bold">什么是 Maven？</h3>
                        </div>
                        <p class="text-gray-600 mb-4">
                            Maven是Apache组织开发的构建工具，采用XML作为配置文件格式，基于"约定优于配置"原则，提供了标准化的项目管理方式。
                        </p>
                        <div class="space-y-3">
                            <div class="flex items-start">
                                <div class="flex-shrink-0 mt-1">
                                    <div class="w-5 h-5 rounded-full bg-red-100 flex items-center justify-center">
                                        <i class="fas fa-check text-red-500 text-xs"></i>
                                    </div>
                                </div>
                                <div class="ml-3">
                                    <p class="text-gray-700"><strong>依赖管理</strong>：基于中央仓库(Maven Central)，支持传递性依赖管理。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="flex-shrink-0 mt-1">
                                    <div class="w-5 h-5 rounded-full bg-red-100 flex items-center justify-center">
                                        <i class="fas fa-check text-red-500 text-xs"></i>
                                    </div>
                                </div>
                                <div class="ml-3">
                                    <p class="text-gray-700"><strong>生命周期管理</strong>：提供 clean, compile, test, package, install, deploy 等默认生命周期。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="flex-shrink-0 mt-1">
                                    <div class="w-5 h-5 rounded-full bg-red-100 flex items-center justify-center">
                                        <i class="fas fa-check text-red-500 text-xs"></i>
                                    </div>
                                </div>
                                <div class="ml-3">
                                    <p class="text-gray-700"><strong>插件生态</strong>：拥有丰富的插件库，可扩展性强。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="flex-shrink-0 mt-1">
                                    <div class="w-5 h-5 rounded-full bg-red-100 flex items-center justify-center">
                                        <i class="fas fa-check text-red-500 text-xs"></i>
                                    </div>
                                </div>
                                <div class="ml-3">
                                    <p class="text-gray-700"><strong>结构化项目管理</strong>：提供统一的项目目录结构和构建方式。</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="bg-gray-50 px-6 py-4 border-t border-gray-200">
                        <div class="flex items-center">
                            <span class="inline-block px-2 py-1 text-xs font-semibold rounded-full bg-red-100 text-red-800">稳定</span>
                            <span class="inline-block px-2 py-1 text-xs font-semibold rounded-full bg-red-100 text-red-800 ml-2">成熟</span>
                            <span class="inline-block px-2 py-1 text-xs font-semibold rounded-full bg-red-100 text-red-800 ml-2">标准化</span>
                        </div>
                    </div>
                </div>

                <!-- Gradle -->
                <div class="bg-white rounded-xl shadow-lg overflow-hidden transition-all duration-300 feature-card">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="w-12 h-12 rounded-md bg-blue-100 flex items-center justify-center mr-4">
                                <i class="fas fa-bolt text-blue-500 text-xl"></i>
                            </div>
                            <h3 class="text-xl font-bold">什么是 Gradle？</h3>
                        </div>
                        <p class="text-gray-600 mb-4">
                            Gradle是一个基于Groovy(或Kotlin DSL)的现代化构建工具，相比Maven更加灵活和高效。
                        </p>
                        <div class="space-y-3">
                            <div class="flex items-start">
                                <div class="flex-shrink-0 mt-1">
                                    <div class="w-5 h-5 rounded-full bg-blue-100 flex items-center justify-center">
                                        <i class="fas fa-check text-blue-500 text-xs"></i>
                                    </div>
                                </div>
                                <div class="ml-3">
                                    <p class="text-gray-700"><strong>增量构建</strong>：只编译和执行修改过的部分，提升构建速度。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="flex-shrink-0 mt-1">
                                    <div class="w-5 h-5 rounded-full bg-blue-100 flex items-center justify-center">
                                        <i class="fas fa-check text-blue-500 text-xs"></i>
                                    </div>
                                </div>
                                <div class="ml-3">
                                    <p class="text-gray-700"><strong>并行执行</strong>：支持任务并行执行，充分利用多核CPU。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="flex-shrink-0 mt-1">
                                    <div class="w-5 h-5 rounded-full bg-blue-100 flex items-center justify-center">
                                        <i class="fas fa-check text-blue-500 text-xs"></i>
                                    </div>
                                </div>
                                <div class="ml-3">
                                    <p class="text-gray-700"><strong>灵活的DSL</strong>：基于Groovy/Kotlin DSL，配置更加简洁。</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="flex-shrink-0 mt-1">
                                    <div class="w-5 h-5 rounded-full bg-blue-100 flex items-center justify-center">
                                        <i class="fas fa-check text-blue-500 text-xs"></i>
                                    </div>
                                </div>
                                <div class="ml-3">
                                    <p class="text-gray-700"><strong>丰富的插件</strong>：提供类似Maven的插件机制，支持自定义任务。</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="bg-gray-50 px-6 py-4 border-t border-gray-200">
                        <div class="flex items-center">
                            <span class="inline-block px-2 py-1 text-xs font-semibold rounded-full bg-blue-100 text-blue-800">高效</span>
                            <span class="inline-block px-2 py-1 text-xs font-semibold rounded-full bg-blue-100 text-blue-800 ml-2">灵活</span>
                            <span class="inline-block px-2 py-1 text-xs font-semibold rounded-full bg-blue-100 text-blue-800 ml-2">现代化</span>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Configuration Comparison -->
        <section class="mb-20">
            <h2 class="text-2xl font-bold mb-8 text-center" id="comparison">2. 配置方式对比</h2>
            <p class="text-gray-600 mb-8 text-center max-w-3xl mx-auto">
                Maven使用XML进行配置，而Gradle使用Groovy/Kotlin DSL。下面的示例展示了两种工具在相同功能上的配置差异。
            </p>
            
            <div class="grid md:grid-cols-2 gap-8">
                <!-- Maven Config -->
                <div>
                    <div class="flex items-center mb-4">
                        <div class="w-10 h-10 rounded-md bg-red-100 flex items-center justify-center mr-3">
                            <i class="fas fa-cube text-red-500"></i>
                        </div>
                        <h3 class="text-xl font-bold">Maven 配置 (pom.xml)</h3>
                    </div>
                    <div class="code-block">
                        <div class="code-lang">XML</div>
                        <pre class="overflow-x-auto p-6"><code class="language-xml">&lt;project&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.ts&lt;/groupId&gt;
  &lt;artifactId&gt;demo-project&lt;/artifactId&gt;
  &lt;version&gt;1.0.0&lt;/version&gt;
  &lt;dependencies&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
      &lt;version&gt;5.3.10&lt;/version&gt;
    &lt;/dependency&gt;
  &lt;/dependencies&gt;
&lt;/project&gt;</code></pre>
                    </div>
                    <div class="mt-4 text-sm text-gray-500 flex items-center">
                        <i class="fas fa-info-circle mr-2"></i> XML结构清晰但相对冗长，适合喜欢严格结构的团队
                    </div>
                </div>
                
                <!-- Gradle Config -->
                <div>
                    <div class="flex items-center mb-4">
                        <div class="w-10 h-10 rounded-md bg-blue-100 flex items-center justify-center mr-3">
                            <i class="fas fa-bolt text-blue-500"></i>
                        </div>
                        <h3 class="text-xl font-bold">Gradle 配置 (build.gradle)</h3>
                    </div>
                    <div class="code-block">
                        <div class="code-lang">Groovy</div>
                        <pre class="overflow-x-auto p-6"><code class="language-groovy">plugins {
    id 'java'
}

group = 'com.ts'
version = '1.0.0'

dependencies {
    implementation 'org.springframework:spring-core:5.3.10'
}</code></pre>
                    </div>
                    <div class="mt-4 text-sm text-gray-500 flex items-center">
                        <i class="fas fa-info-circle mr-2"></i> DSL语法简洁，可读性和可维护性更强，适合追求效率的团队
                    </div>
                </div>
            </div>
        </section>

        <!-- Dependency Management -->
        <section class="mb-20">
            <h2 class="text-2xl font-bold mb-8 text-center">3. 依赖管理对比</h2>
            
            <div class="grid md:grid-cols-2 gap-8">
                <!-- Maven Dependencies -->
                <div>
                    <div class="flex items-center mb-6">
                        <div class="w-10 h-10 rounded-md bg-red-100 flex items-center justify-center mr-3">
                            <i class="fas fa-cube text-red-500"></i>
                        </div>
                        <h3 class="text-xl font-bold">Maven 依赖管理</h3>
                    </div>
                    <p class="text-gray-600 mb-4">
                        Maven依赖基于&lt;dependencies&gt;进行声明，并通过&lt;scope&gt;控制作用范围：
                    </p>
                    <div class="space-y-3 mb-6">
                        <div class="flex items-center bg-gray-50 p-3 rounded-md">
                            <div class="w-8 h-8 rounded-full bg-red-100 flex items-center justify-center mr-3">
                                <span class="text-red-500 font-mono text-sm">compile</span>
                            </div>
                            <div>
                                <p class="font-medium">默认范围</p>
                                <p class="text-sm text-gray-500">编译时需要，打包时包含</p>
                            </div>
                        </div>
                        <div class="flex items-center bg-gray-50 p-3 rounded-md">
                            <div class="w-8 h-8 rounded-full bg-red-100 flex items-center justify-center mr-3">
                                <span class="text-red-500 font-mono text-sm">provided</span>
                            </div>
                            <div>
                                <p class="font-medium">提供范围</p>
                                <p class="text-sm text-gray-500">编译时需要，运行时由外部容器提供</p>
                            </div>
                        </div>
                        <div class="flex items-center bg-gray-50 p-3 rounded-md">
                            <div class="w-8 h-8 rounded-full bg-red-100 flex items-center justify-center mr-3">
                                <span class="text-red-500 font-mono text-sm">runtime</span>
                            </div>
                            <div>
                                <p class="font-medium">运行时范围</p>
                                <p class="text-sm text-gray-500">编译时不需要，运行时需要</p>
                            </div>
                        </div>
                        <div class="flex items-center bg-gray-50 p-3 rounded-md">
                            <div class="w-8 h-8 rounded-full bg-red-100 flex items-center justify-center mr-3">
                                <span class="text-red-500 font-mono text-sm">test</span>
                            </div>
                            <div>
                                <p class="font-medium">测试范围</p>
                                <p class="text-sm text-gray-500">仅用于测试编译和运行</p>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- Gradle Dependencies -->
                <div>
                    <div class="flex items-center mb-6">
                        <div class="w-10 h-10 rounded-md bg-blue-100 flex items-center justify-center mr-3">
                            <i class="fas fa-bolt text-blue-500"></i>
                        </div>
                        <h3 class="text-xl font-bold">Gradle 依赖管理</h3>
                    </div>
                    <p class="text-gray-600 mb-4">
                        Gradle依赖管理更加灵活，支持动态版本和更细粒度的控制：
                    </p>
                    <div class="space-y-3 mb-6">
                        <div class="flex items-center bg-gray-50 p-3 rounded-md">
                            <div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-3">
                                <span class="text-blue-500 font-mono text-sm">implementation</span>
                            </div>
                            <div>
                                <p class="font-medium">实现依赖</p>
                                <p class="text-sm text-gray-500">编译时可用，但不会暴露给依赖它的模块</p>
                            </div>
                        </div>
                        <div class="flex items-center bg-gray-50 p-3 rounded-md">
                            <div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-3">
                                <span class="text-blue-500 font-mono text-sm">api</span>
                            </div>
                            <div>
                                <p class="font-medium">API依赖</p>
                                <p class="text-sm text-gray-500">类似compile，编译时和运行时均可用</p>
                            </div>
                        </div>
                        <div class="flex items-center bg-gray-50 p-3 rounded-md">
                            <div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-3">
                                <span class="text-blue-500 font-mono text-sm">runtimeOnly</span>
                            </div>
                            <div>
                                <p class="font-medium">仅运行时</p>
                                <p class="text-sm text-gray-500">仅运行时可用</p>
                            </div>
                        </div>
                        <div class="flex items-center bg-gray-50 p-3 rounded-md">
                            <div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-3">
                                <span class="text-blue-500 font-mono text-sm">testImplementation</span>
                            </div>
                            <div>
                                <p class="font-medium">测试实现</p>
                                <p class="text-sm text-gray-500">仅用于测试</p>
                            </div>
                        </div>
                    </div>
                    <div class="bg-blue-50 p-4 rounded-md">
                        <div class="flex">
                            <div class="flex-shrink-0">
                                <i class="fas fa-info-circle text-blue-500"></i>
                            </div>
                            <div class="ml-3">
                                <p class="text-sm text-blue-700">
                                    Gradle依赖解析速度比Maven更快，且支持动态版本，例如：<br>
                                    <code class="bg-blue-100 text-blue-800 px-2 py-1 rounded">implementation 'org.springframework:spring-core:5.+'</code>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Build Speed -->
        <section class="mb-20">
            <h2 class="text-2xl font-bold mb-8 text-center">4. 构建速度对比</h2>
            
            <div class="bg-white rounded-xl shadow-lg p-8 mb-8">
                <div class="flex flex-col md:flex-row items-center">
                    <div class="md:w-1/2 mb-8 md:mb-0">
                        <h3 class="text-xl font-bold mb-4">Gradle在构建速度上比Maven具有明显优势</h3>
                        <p class="text-gray-600 mb-4">
                            在大规模项目中，Gradle的构建速度通常是Maven的2~5倍，这主要得益于以下优化：
                        </p>
                        <div class="space-y-4">
                            <div class="flex items-start">
                                <div class="flex-shrink-0 mt-1">
                                    <div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center">
                                        <i class="fas fa-tachometer-alt text-blue-500"></i>
                                    </div>
                                </div>
                                <div class="ml-3">
                                    <p class="font-medium text-gray-800">增量构建</p>
                                    <p class="text-sm text-gray-600">Gradle仅重新编译和执行修改过的代码，而Maven每次都会全量编译</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="flex-shrink-0 mt-1">
                                    <div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center">
                                        <i class="fas fa-database text-blue-500"></i>
                                    </div>
                                </div>
                                <div class="ml-3">
                                    <p class="font-medium text-gray-800">任务缓存</p>
                                    <p class="text-sm text-gray-600">Gradle缓存任务执行结果，如果没有更改，会跳过执行</p>
                                </div>
                            </div>
                            <div class="flex items-start">
                                <div class="flex-shrink-0 mt-1">
                                    <div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center">
                                        <i class="fas fa-random text-blue-500"></i>
                                    </div>
                                </div>
                                <div class="ml-3">
                                    <p class="font-medium text-gray-800">并行构建</p>
                                    <p class="text-sm text-gray-600">Gradle默认支持并行执行任务，而Maven需要手动指定-T参数</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="md:w-1/2">
                        <div class="bg-gray-50 p-6 rounded-lg">
                            <div class="flex justify-between mb-3">
                                <span class="font-medium">Gradle构建</span>
                                <span class="text-blue-600 font-medium">快2-5倍</span>
                            </div>
                            <div class="w-full bg-gray-200 rounded-full h-4 mb-6">
                                <div class="bg-gradient-to-r from-blue-400 to-blue-600 h-4 rounded-full" style="width: 85%"></div>
                            </div>
                            <div class="flex justify-between mb-3">
                                <span class="font-medium">Maven构建</span>
                                <span class="text-gray-600">基准速度</span>
                            </div>
                            <div class="w-full bg-gray-200 rounded-full h-4">
                                <div class="bg-gray-400 h-4 rounded-full" style="width: 100%"></div>
                            </div>
                            <div class="mt-6 bg-white p-4 rounded-md shadow-sm">
                                <div class="flex items-center">
                                    <div class="flex-shrink-0">
                                        <i class="fas fa-lightbulb text-yellow-500"></i>
                                    </div>
                                    <div class="ml-3">
                                        <p class="text-sm text-gray-600">
                                            如果项目构建时间超过1分钟，考虑切换到Gradle可以显著提升开发效率
                                        </p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Plugin Ecosystem -->
        <section class="mb-20">
            <h2 class="text-2xl font-bold mb-8 text-center">5. 插件生态对比</h2>
            
            <div class="grid md:grid-cols-2 gap-8">
                <!-- Maven Plugins -->
                <div>
                    <div class="flex items-center mb-6">
                        <div class="w-10 h-10 rounded-md bg-red-100 flex items-center justify-center mr-3">
                            <i class="fas fa-cube text-red-500"></i>
                        </div>
                        <h3 class="text-xl font-bold">Maven 插件生态</h3>
                    </div>
                    <p class="text-gray-600 mb-4">
                        Maven生态更加成熟，提供丰富的官方和社区插件：
                    </p>
                    <div class="space-y-4">
                        <div class="bg-white p-4 rounded-lg shadow-sm border-l-4 border-red-400">
                            <div class="flex items-center">
                                <div class="flex-shrink-0">
                                    <i class="fas fa-code text-red-500"></i>
                                </div>
                                <div class="ml-3">
                                    <p class="font-medium">maven-compiler-plugin</p>
                                    <p class="text-sm text-gray-600">Java编译插件，控制源代码和目标版本</p>
                                </div>
                            </div>
                        </div>
                        <div class="bg-white p-4 rounded-lg shadow-sm border-l-4 border-red-400">
                            <div class="flex items-center">
                                <div class="flex-shrink-0">
                                    <i class="fas fa-vial text-red-500"></i>
                                </div>
                                <div class="ml-3">
                                    <p class="font-medium">maven-surefire-plugin</p>
                                    <p class="text-sm text-gray-600">测试插件，用于执行单元测试</p>
                                </div>
                            </div>
                        </div>
                        <div class="bg-white p-4 rounded-lg shadow-sm border-l-4 border-red-400">
                            <div class="flex items-center">
                                <div class="flex-shrink-0">
                                    <i class="fas fa-box-open text-red-500"></i>
                                </div>
                                <div class="ml-3">
                                    <p class="font-medium">maven-assembly-plugin</p>
                                    <p class="text-sm text-gray-600">打包插件，创建自定义分发包</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="mt-6 bg-red-50 p-4 rounded-md">
                        <div class="flex">
                            <div class="flex-shrink-0">
                                <i class="fas fa-check-circle text-red-500"></i>
                            </div>
                            <div class="ml-3">
                                <p class="text-sm text-red-700">
                                    Maven插件生态成熟稳定，几乎所有Java开发需求都能找到现成插件
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- Gradle Plugins -->
                <div>
                    <div class="flex items-center mb-6">
                        <div class="w-10 h-10 rounded-md bg-blue-100 flex items-center justify-center mr-3">
                            <i class="fas fa-bolt text-blue-500"></i>
                        </div>
                        <h3 class="text-xl font-bold">Gradle 插件生态</h3>
                    </div>
                    <p class="text-gray-600 mb-4">
                        Gradle也提供类似插件，但可扩展性更强：
                    </p>
                    <div class="space-y-4">
                        <div class="bg-white p-4 rounded-lg shadow-sm border-l-4 border-blue-400">
                            <div class="flex items-center">
                                <div class="flex-shrink-0">
                                    <i class="fab fa-java text-blue-500"></i>
                                </div>
                                <div class="ml-3">
                                    <p class="font-medium">java</p>
                                    <p class="text-sm text-gray-600">Java构建插件，提供编译、测试和打包功能</p>
                                </div>
                            </div>
                        </div>
                        <div class="bg-white p-4 rounded-lg shadow-sm border-l-4 border-blue-400">
                            <div class="flex items-center">
                                <div class="flex-shrink-0">
                                    <i class="fas fa-rocket text-blue-500"></i>
                                </div>
                                <div class="ml-3">
                                    <p class="font-medium">application</p>
                                    <p class="text-sm text-gray-600">打包和运行应用插件</p>
                                </div>
                            </div>
                        </div>
                        <div class="bg-white p-4 rounded-lg shadow-sm border-l-4 border-blue-400">
                            <div class="flex items-center">
                                <div class="flex-shrink-0">
                                    <i class="fas fa-copy text-blue-500"></i>
                                </div>
                                <div class="ml-3">
                                    <p class="font-medium">shadow</p>
                                    <p class="text-sm text-gray-600">创建Fat JAR的插件，将所有依赖打包到一个JAR中</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="mt-6 bg-blue-50 p-4 rounded-md">
                        <div class="flex">
                            <div class="flex-shrink-0">
                                <i class="fas fa-exclamation-circle text-blue-500"></i>
                            </div>
                            <div class="ml-3">
                                <p class="text-sm text-blue-700">
                                    对于已有大量Maven插件的项目，迁移到Gradle可能需要额外适配工作
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Comparison Table -->
        <section class="mb-20">
            <h2 class="text-2xl font-bold mb-8 text-center">6. 适用场景对比</h2>
            
            <div class="overflow-x-auto">
                <table class="min-w-full comparison-table">
                    <thead>
                        <tr>
                            <th class="text-left">对比项</th>
                            <th class="text-left">Maven</th>
                            <th class="text-left">Gradle</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td class="font-medium">学习成本</td>
                            <td>低(XML结构清晰)</td>
                            <td>略高(DSL需要学习)</td>
                        </tr>
                        <tr>
                            <td class="font-medium">构建速度</td>
                            <td>较慢</td>
                            <td>快(增量构建 + 并行执行)</td>
                        </tr>
                        <tr>
                            <td class="font-medium">插件生态</td>
                            <td>成熟稳定</td>
                            <td>仍在发展，但已较完善</td>
                        </tr>
                        <tr>
                            <td class="font-medium">可维护性</td>
                            <td>代码冗长</td>
                            <td>配置简洁</td>
                        </tr>
                        <tr>
                            <td class="font-medium">适用项目</td>
                            <td>传统企业级项目</td>
                            <td>现代微服务、大型项目</td>
                        </tr>
                    </tbody>
                </table>
            </div>
            
            <div class="mt-8 grid md:grid-cols-2 gap-8">
                <div class="bg-red-50 p-6 rounded-lg">
                    <div class="flex items-center mb-4">
                        <div class="w-10 h-10 rounded-md bg-red-100 flex items-center justify-center mr-3">
                            <i class="fas fa-cube text-red-500"></i>
                        </div>
                        <h3 class="text-lg font-bold">Maven适用场景</h3>
                    </div>
                    <p class="text-gray-700">
                        如果项目是<strong>传统Java企业应用</strong>，例如Spring Boot、JEE项目，使用Maven更加稳定。
                    </p>
                </div>
                <div class="bg-blue-50 p-6 rounded-lg">
                    <div class="flex items-center mb-4">
                        <div class="w-10 h-10 rounded-md bg-blue-100 flex items-center justify-center mr-3">
                            <i class="fas fa-bolt text-blue-500"></i>
                        </div>
                        <h3 class="text-lg font-bold">Gradle适用场景</h3>
                    </div>
                    <p class="text-gray-700">
                        如果项目是<strong>微服务架构、大型项目、Android开发</strong>，Gradle由于其高效构建能力更加适合。
                    </p>
                </div>
            </div>
        </section>

        <!-- Mermaid Diagram -->
        <section class="mb-20">
            <h2 class="text-2xl font-bold mb-8 text-center">构建工具决策流程图</h2>
            <div class="mermaid">
                graph TD
                    A[新项目需要构建工具] --> B{项目规模?}
                    B -->|小型/简单| C[考虑Maven]
                    B -->|大型/复杂| D[考虑Gradle]
                    C --> E{需要快速构建?}
                    E -->|是| F[评估Gradle]
                    E -->|否| G[使用Maven]
                    D --> H{团队熟悉度?}
                    H -->|熟悉Maven| I[评估迁移成本]
                    H -->|熟悉Gradle| J[使用Gradle]
                    I --> K{可接受学习曲线?}
                    K -->|是| J
                    K -->|否| G
            </div>
        </section>

        <!-- Recommendation -->
        <section class="mb-20" id="recommendation">
            <h2 class="text-2xl font-bold mb-8 text-center">7. 该选择哪一个？</h2>
            
            <div class="bg-white rounded-xl shadow-lg p-8">
                <div class="flex flex-col md:flex-row">
                    <div class="md:w-1/2 mb-8 md:mb-0 md:pr-8">
                        <div class="flex items-center mb-6">
                            <div class="w-12 h-12 rounded-md bg-purple-100 flex items-center justify-center mr-4">
                                <i class="fas fa-check-circle text-purple-500 text-xl"></i>
                            </div>
                            <h3 class="text-xl font-bold">选择建议</h3>
                        </div>
                        <ul class="space-y-4">
                            <li class="flex items-start">
                                <div class="flex-shrink-0 mt-1">
                                    <div class="w-6 h-6 rounded-full bg-purple-100 flex items-center justify-center">
                                        <i class="fas fa-check text-purple-500 text-xs"></i>
                                    </div>
                                </div>
                                <div class="ml-3">
                                    <p>如果你想要<strong>稳定、成熟的依赖管理</strong>，并且团队成员对XML更熟悉，选择<strong>Maven</strong></p>
                                </div>
                            </li>
                            <li class="flex items-start">
                                <div class="flex-shrink-0 mt-1">
                                    <div class="w-6 h-6 rounded-full bg-purple-100 flex items-center justify-center">
                                        <i class="fas fa-check text-purple-500 text-xs"></i>
                                    </div>
                                </div>
                                <div class="ml-3">
                                    <p>如果你需要<strong>高性能构建、灵活的DSL语法</strong>，并且希望提升CI/CD速度，选择<strong>Gradle</strong></p>
                                </div>
                            </li>
                            <li class="flex items-start">
                                <div class="flex-shrink-0 mt-1">
                                    <div class="w-6 h-6 rounded-full bg-purple-100 flex items-center justify-center">
                                        <i class="fas fa-check text-purple-500 text-xs"></i>
                                    </div>
                                </div>
                                <div class="ml-3">
                                    <p>如果团队已经使用Maven，但构建速度慢，可以尝试<strong>Maven并行构建(-T参数)</strong>或逐步迁移到<strong>Gradle</strong></p>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="md:w-1/2">
                        <div class="bg-purple-50 p-6 rounded-lg h-full">
                            <h3 class="text-lg font-bold mb-4 flex items-center">
                                <i class="fas fa-lightbulb text-purple-500 mr-2"></i> 最终结论
                            </h3>
                            <p class="text-gray-700 mb-4">
                                Maven和Gradle并没有绝对的优劣，关键是根据团队需求和项目类型选择合适的工具。
                            </p>
                            <div class="bg-white p-4 rounded-md shadow-sm mb-4">
                                <div class="flex items-center">
                                    <div class="flex-shrink-0">
                                        <i class="fas fa-cube text-red-500"></i>
                                    </div>
                                    <div class="ml-3">
                                        <p class="text-sm text-gray-700">
                                            <strong>选择Maven如果：</strong>项目稳定，不需要频繁构建，团队熟悉XML配置
                                        </p>
                                    </div>
                                </div>
                            </div>
                            <div class="bg-white p-4 rounded-md shadow-sm">
                                <div class="flex items-center">
                                    <div class="flex-shrink-0">
                                        <i class="fas fa-bolt text-blue-500"></i>
                                    </div>
                                    <div class="ml-3">
                                        <p class="text-sm text-gray-700">
                                            <strong>选择Gradle如果：</strong>项目复杂，需要快速迭代，团队愿意学习DSL
                                        </p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-12">
        <div class="container mx-auto px-4">
            <div class="text-center">
                <h3 class="text-xl font-medium text-white mb-2">技术小馆</h3>
                <p class="mb-6">探索技术世界的奥秘</p>
                <a href="http://www.yuque.com/jtostring" class="text-blue-400 hover:text-blue-300 transition duration-300">
                    <i class="fas fa-external-link-alt mr-2"></i>www.yuque.com/jtostring
                </a>
                <div class="mt-6">
                    <p class="text-sm text-gray-500">© 2023 技术小馆. 保留所有权利.</p>
                </div>
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>
```